package com.gilgamesh.mall.sdk.client.product;

import com.gilgamesh.mall.sdk.bean.product.ClassficEntity;
import com.gilgamesh.mall.sdk.dto.ResponseDTO;
import com.gilgamesh.mall.sdk.dto.product.ClassficDTO;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author yanm
 * @date 2021/1/12 17:27
 **/
@RestController
@RequestMapping("api/classfic")
public interface ClassficClient {

    @RequestMapping("add")
    ResponseDTO<Integer> addClassfic(@RequestBody ClassficEntity classficEntity);

    @PostMapping("tree")
    ResponseDTO<ClassficDTO> getTreeList(@RequestParam Long classficId);

    @PostMapping("list")
    ResponseDTO<List<ClassficDTO>> listClassfic(ClassficEntity classficEntity);

    @GetMapping("get/{id}")
    ResponseDTO<ClassficDTO> getById(@PathVariable(value = "id") Long id);
}
